package com.newgrand.domain.model;


import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

/**
 * @创建人：ZhaoFengjie
 * @修改人：ZhaoFengjie
 * @创建时间：14:48 2022/10/11
 * @修改时间:：14:48 2022/10/11
 */
@Data
@ApiModel(value = "PurchasePlan", description = "采购计划数据模型")
public class PurchasePlan {

    /**
     * 采购计划列表
     */
    @ApiModelProperty(value = "采购计划列表")
    private List<PurchasePlanData> data;

    /**
     * 采购计划表头
     */
    @Data
    @ApiModel(value = "PurchasePlanData", description = "采购计划表头模型")
    public class PurchasePlanData {
        @ApiModelProperty(value = "")
        private String tenant;
        @ApiModelProperty(value = "主键id")
        private Long id;
        @ApiModelProperty(value = "区域")
        private String area;
        @ApiModelProperty(value = "提交人")
        private String submittor;
        @ApiModelProperty(value = "审批人")
        private String approver;
        @ApiModelProperty(value = "制单人")
        private String maker;
        @ApiModelProperty(value = "备注")
        private String remark;
        @ApiModelProperty(value = "版本号")
        private Long version;
        @ApiModelProperty(value = "")
        private String pusher;
        @ApiModelProperty(value = "组织机构id")
        private Long orgId;
        @ApiModelProperty(value = "组织机构名称")
        private String orgName;
        @ApiModelProperty(value = "入账时间")
        @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
        @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
        private Date recordedDate;
        @ApiModelProperty(value = "单据编码")
        private String orderCode;
        @ApiModelProperty(value = "")
        private String sortOrderCode;
        @ApiModelProperty(value = "单据日期")
        private String orderDate;
        @ApiModelProperty(value = "计划名称")
        private String planName;
        @ApiModelProperty(value = "使用项目")
        private String useProject;
        @ApiModelProperty(value = "采购方式")
        private String purchaseMethod;
        @ApiModelProperty(value = "采购方式全称")
        private String purchaseMethodFullName;
        @ApiModelProperty(value = "申报原因")
        private String declarationReasons;
        @ApiModelProperty(value = "合计金额")
        private Integer totalAmount;
        @ApiModelProperty(value = "提交状态")
        private Boolean isSubmit;
        @ApiModelProperty(value = "提交时间")
        @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
        @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
        private Date submitDate;
        @ApiModelProperty(value = "是否审批 (1,需要审批,0不需要审批)")
        private Boolean isApproved;
        @ApiModelProperty(value = "审批状态 1:审批完成 通过1 驳回2 初始0")
        private Integer approveState;
        @ApiModelProperty(value = "审批时间")
        private String approveTime;
        @ApiModelProperty(value = "审批结果")
        private String approveResult;
        @ApiModelProperty(value = "制单日期")
        @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
        @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
        private Date makerDate;
        @ApiModelProperty(value = "来源组织id")
        private String oriOrgId;
        @ApiModelProperty(value = "创建人id")
        private Long creatorId;
        @ApiModelProperty(value = "创建人名称")
        private String creatorName;
        @ApiModelProperty(value = "修改人id")
        private Long modifierId;
        @ApiModelProperty(value = "修改人名称")
        private String modifierName;
        @ApiModelProperty(value = "制单人联系方式")
        private String makerPhone;
        @ApiModelProperty(value = "创建时间")
        @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
        @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
        private Date createdAt;
        @ApiModelProperty(value = "修改时间")
        @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
        @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
        private Date updatedAt;
        @ApiModelProperty(value = "是否移除")
        private Boolean isRemoved;
        @ApiModelProperty(value = "")
        private Boolean isOffer;
        @ApiModelProperty(value = "询价单的id")
        private String oriOfferId;
        @ApiModelProperty(value = "是否转发")
        private Boolean isForward;
        @ApiModelProperty(value = "模块类型 0:采购计划/1:供应计划")
        private Integer moduleType;
        @ApiModelProperty(value = "推送状态")
        private Integer pushStatus;
        @ApiModelProperty(value = "推送时间")
        private String pushDate;
        @ApiModelProperty(value = "采购计划清单")
        private List<PurchasePlanDataItem> items;
    }

    /**
     * 采购计划清单
     */
    @Data
    @ApiModel(value = "PurchasePlanDataItem", description = "采购计划清单模型")
    public class PurchasePlanDataItem {
        @ApiModelProperty(value = "")
        private String tenant;
        @ApiModelProperty(value = "明细主键id")
        private Long id;
        @ApiModelProperty(value = "需求数量")
        private Double quantity;
        @ApiModelProperty(value = "备注")
        private String remark;
        @ApiModelProperty(value = "版本号")
        private Long version;
        @ApiModelProperty(value = "组织机构id")
        private Long orgId;
        @ApiModelProperty(value = "主表主键id")
        private Long orderId;
        @ApiModelProperty(value = "材料id")
        private Long materialId;
        @ApiModelProperty(value = "材料编码")
        private String materialName;
        @ApiModelProperty(value = "材料单位")
        private String materialUnit;
        @ApiModelProperty(value = "材料规格型号")
        private String materialModel;
        @ApiModelProperty(value = "材料编码")
        private String materialCode;
        @ApiModelProperty(value = "")
        private Long classId;
        @ApiModelProperty(value = "")
        private String classFullId;
        @ApiModelProperty(value = "")
        private String oriMaterialId;
        @ApiModelProperty(value = "")
        private String oriClassId;
        @ApiModelProperty(value = "预算单价")
        private Double purchasePrice;
        @ApiModelProperty(value = "预算金额")
        private Double purchaseSum;
        @ApiModelProperty(value = "需求时间起")
        private String startDate;
        @ApiModelProperty(value = "需求时间止")
        private String endDate;
        @ApiModelProperty(value = "交货地点（存放地）")
        private String storagePlace;
        @ApiModelProperty(value = "交货状态级标准")
        private String deliveryStandard;
        @ApiModelProperty(value = "")
        private Integer sortCode;
        @ApiModelProperty(value = "创建人id")
        private Long creatorId;
        @ApiModelProperty(value = "创建人名称")
        private String creatorName;
        @ApiModelProperty(value = "修改人id")
        private Long modifierId;
        @ApiModelProperty(value = "修改人名称")
        private String modifierName;
        @ApiModelProperty(value = "创建时间")
        @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
        @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
        private Date createdAt;
        @ApiModelProperty(value = "修改时间")
        @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
        @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
        private Date updatedAt;
        @ApiModelProperty(value = "")
        private Boolean isRemoved;
        @ApiModelProperty(value = "工号id")
        private Integer ghId;
        @ApiModelProperty(value = "工号全称")
        private String ghFullName;
        @ApiModelProperty(value = "工号名称")
        private String ghName;
        @ApiModelProperty(value = "")
        private String oriGhId;
    }
}
